/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package business;

import dal.HotelsDAL;
import java.util.List;
import model.Hotels;

/**
 *
 * @author Administrator
 */
public class HotelsBusiness {

    private HotelsDAL hotelsDAL = new HotelsDAL();

    public boolean newHotels(Hotels hotel) {
        if (hotelsDAL.newHotels(hotel)) {
            return true;
        }
        return false;
    }

    public boolean updateHotels(Hotels hotel) {
        if (hotelsDAL.updateHotels(hotel)) {
            return true;
        }
        return false;
    }

    public List<Hotels> listHotelByPlaceID(int placeID) {
        return hotelsDAL.listHotelByPlaceID(placeID);
    }

    public List<Hotels> listAllHotelDetail() {
        return hotelsDAL.listAllHotel();
    }

    public int getRowInHotel() {
        return hotelsDAL.getRowInHotel();
    }

    public List<Hotels> listHotelByPage(int pageID) {
        return hotelsDAL.listHotelByPage(pageID);
    }

    public List<Hotels> searchHotelByName(String hotelName) {
        return hotelsDAL.searchHotelByName(hotelName);
    }

    public List<Hotels> searchHotelByPlaceName(String placeName) {
        return hotelsDAL.searchHotelByPlace(placeName);
    }

    public List<Hotels> searchHotelByPrice(float priceFrom , float priceTo ) {
        return hotelsDAL.searchHotelByPrice(priceFrom, priceTo);
    }

    public List<Hotels> advanceSearchHotel(String hotelName , String placeName ,float priceFrom, float priceTo) {
        return hotelsDAL.advanceSearchHotel(hotelName, placeName, priceFrom, priceTo);
    }
}
